﻿using Epam.PeopleInterfaces;

namespace Epam.PeopleRepository
{
    static class FromBusinessToDtoMapper
    {
        static public DtoPeopleEntity Convert(IPeopleEntity entity)
        {
            return new DtoPeopleEntity
                       {
                           Id = entity.Id,
                           BirthDate = entity.BirthDate,
                           Name = entity.Name,
                           Weight = entity.Weight,
                           Height =entity.Height
                       };
        }

        static public DtoNewsEntity Convert(INewsEntity entity)
        {
            return new DtoNewsEntity
                       {
                           Id = entity.Id,
                           Text = entity.Text,
                           Title = entity.Title,
                           Created = entity.Created
                       };
        }
    }
}
